package com.cyy.factory_pattern.abstract_factory.person;

import com.cyy.factory_pattern.abstract_factory.S1;
import com.cyy.factory_pattern.abstract_factory.S2;
import com.cyy.factory_pattern.abstract_factory.Zz;
import com.cyy.factory_pattern.abstract_factory.pigeon.B2;
import com.cyy.factory_pattern.abstract_factory.pigeon.C2;
import com.cyy.factory_pattern.abstract_factory.sword.B1;
import com.cyy.factory_pattern.abstract_factory.sword.C1;

/**
 * 女铸剑师类
 */
public class Nv implements Zz {
    private static  S1 s1;
    private static  S2 s2;

    @Override
    public S1 abc1(String a) {
        if ("冰魄剑".equals(a)) {
            s1 = new B1();
        } else if ("紫云剑".equals(a)) {
            s1 = new C1();
        } else {
            System.out.println("铸剑失败");
        }
        return s1;
    }

    @Override
    public S2 abc2(String a) {
        if ("灵鸽二号".equals(a)) {
            s2 = new B2();
        } else if ("灵鸽三号".equals(a)) {
            s2 = new C2();
        } else {
            System.out.println("领养失败");
        }
        return s2;
    }
}
